package springboot_api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import springboot_api.entity.ApiEntity;
import springboot_api.service.ApiService;

@RestController
@RequestMapping(value = "/api")
public class ApiController {
	@Autowired
	private ApiService apiService;
	@GetMapping(value = "/insert")
	boolean insert() {
		ApiEntity[] infos=apiService.select();
		for(ApiEntity info:infos) {
			apiService.insertApi(info);
		}
		return true;
		
	}
	
}
